<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
	<meta charset="UTF-8">
	<link rel="shortcut icon" href="favicon.ico">
	<link rel="stylesheet" href="css/iconfont.css">
	<link rel="stylesheet" href="css/global.css">
	<link rel="stylesheet" href="css/bootstrap.min.css">
	<link rel="stylesheet" href="css/bootstrap-theme.min.css">
	<link rel="stylesheet" href="css/swiper.min.css">
	<link rel="stylesheet" href="css/styles.css">
	<script src="js/jquery.1.12.4.min.js" charset="UTF-8"></script>
	<script src="js/bootstrap.min.js" charset="UTF-8"></script>
	<script src="js/swiper.min.js" charset="UTF-8"></script>
	<script src="js/global.js" charset="UTF-8"></script>
	<script src="js/jquery.DJMask.2.1.1.js" charset="UTF-8"></script>
	<title>XXX</title>
	<!--
    	作者：L
    	时间：2021-12-12
    	描述：js 下拉框
    -->
		<script src="js/jquery.DJMask.2.1.1.js" charset="UTF-8"></script>
	<script src="js/index2.js"></script> 
	<link rel="stylesheet" type="text/css" href="css/center.css">
	 <script type="text/javascript">
		$(function(){//第一步都得写这个
			$(document).on("click",".centers_listm_one_in",function(){
			$(this).next(".gjszmdm").slideToggle().siblings("gjszmdm").slideUp()
			});
		})
	
			/*$(document).ready(function(){ $('.to-top').toTop({position:false}) });*/
		</script>
		<link rel="stylesheet" href="css/logo.css" />
</head>
<body>
	<!-- 顶部tab -->
	<div id="dingdan">
	
	</div>
	<!-- 顶部标题 -->
	<div class="bgf5 clearfix">
		<div class="top-user">
			<div class="inner">
				<a class="logo" href="index.html"><li id="logo"></li></a>
				<div class="title">个人中心</div>
			</div>
		</div>
	</div>
	<div class="content clearfix bgf5">
		<section class="user-center inner clearfix">
			<div class="pull-left bgf">
				<div id="caidan" style="position: absolute;">
            	
            </div>
			<div class="pull-right" style="    position: absolute;
    left: 400px;
    width: 1000px;">
				<div class="user-content__box clearfix bgf">
					<div class="title">账户信息-积分平台</div>
					<ul class="nav user-nav__title" role="tablist">
						<li role="presentation" class="nav-item active"><a href="#list" aria-controls="list" role="tab" data-toggle="tab">我的积分</a></li>
						<!-- <li role="presentation" class="nav-item "><a href="#detail" aria-controls="detail" role="tab" data-toggle="tab">积分明细</a></li> -->
					</ul>
					<div class="integral-box clearfix bgf5">
						
						<div class="integral-total">
						 						<div class="fz16">可用的积分</div> 
												<table >
							<tbody id="jfen" >
								
							</tbody>
						</table> 
						 						
						 					</div>
						
						<div class="integral-desc">
							<b class="cr fz16">积分使用规则：</b><br>
							<span class="c3">1、如何获得积分？</span>
							<ul>
								<li>1) 积分可以通过在购买商品获得，积分会在确认收货的时候增加。</li>
								<li>2) 通过签到获得：每次签到可获得 3 积分</li>
							</ul>
							<span class="c3">2、如何使用积分？</span>
							<ul><li>可使用积分兑换商品</li></ul>
						</div>
					</div>
					<div class="tab-content">
						<div role="tabpanel" class="tab-pane fade in active" id="list">
							<p class="fz18 cr">商品兑换</p>
							<ul class="nav user-nav__title" role="tablist">
								<li role="presentation" class="nav-item active"><a href="#all" aria-controls="all" role="tab" data-toggle="tab">全部</a></li>
								<li role="presentation" class="nav-item "><a href="#usable" aria-controls="usable" role="tab" data-toggle="tab">可兑换</a></li>
							</ul>
							<div class="table-thead">
								<div class="tdf3">商品信息</div>
								<div class="tdf2">市场价</div>
								<div class="tdf2">所需积分</div>
								<div class="tdf1">操作</div>
							</div>
							<div class="tab-content">
								<div role="tabpanel" class="tab-pane fade in active" id="all">
									
									<table >
										<tbody id="neirong">
											
											
										</tbody>
									</table>
									
									<div class="page text-right clearfix">
										<a class="disabled">上一页</a>
										<a class="select">1</a>
										<a href="">2</a>
										<a href="">3</a>
										<a class="" href="">下一页</a>
									</div>
								</div>
								<div role="tabpanel" class="tab-pane fade" id="usable">
									
									
									<table >
										<tbody id="keduihuan">
											
										</tbody>
									</table>
									
									
									<div class="page text-right clearfix">
										<a class="disabled">上一页</a>
										<a class="select">1</a>
										<a href="">2</a>
										<a href="">3</a>
										<a class="" href="">下一页</a>
									</div>
								</div>
							</div>
						</div>
						<div role="tabpanel" class="tab-pane fade" id="detail">
							<div class="table-thead">
								<div class="tdf3">来源/用途</div>
								<div class="tdf2">积分变化</div>
								<div class="tdf2">日期</div>
								<div class="tdf1">备注</div>
							</div>
							<div class="integral-item__list">
								<div class="integral-item">
									<div class="tdf3">
										<a class="integral-item__info" href="">
											<div class="img"><img src="images/temp/M-001.jpg" alt="" class="cover"></div>
											<div class="name ep2">锦瑟 原创传统日常汉服男绣花交领衣裳cp情侣装春夏款</div>
											<div class="type">颜色分类：深棕色 尺码：均码</div>
										</a>
									</div>
									<div class="tdf2">
										<b class="fz24 cg">+200</b>
									</div>
									<div class="tdf2"><span class="c6">2017年4月12日 15:13:14</span></div>
									<div class="tdf1">
										<span class="c6">交易获得</span>
									</div>
								</div>
								<div class="integral-item">
									<div class="tdf3">
										<a class="integral-item__info" href="">
											<div class="img"><img src="images/temp/M-002.jpg" alt="" class="cover"></div>
											<div class="name ep2">锦瑟 原创传统日常汉服男绣花交领衣裳cp情侣装春夏款</div>
											<div class="type">颜色分类：深棕色 尺码：均码</div>
										</a>
									</div>
									<div class="tdf2">
										<b class="fz24 cr">-1500</b>
									</div>
									<div class="tdf2"><span class="c6">2017年4月12日 15:13:14</span></div>
									<div class="tdf1">
										<span class="c6">兑换消耗</span>
									</div>
								</div>
								<div class="integral-item">
									<div class="tdf3">
										<a class="integral-item__info" href="">
											<div class="img"><img src="images/temp/M-003.jpg" alt="" class="cover"></div>
											<div class="name ep2">锦瑟 原创传统日常汉服男绣花交领衣裳cp情侣装春夏款</div>
											<div class="type">颜色分类：深棕色 尺码：均码</div>
										</a>
									</div>
									<div class="tdf2">
										<b class="fz24 cg">+300</b>
									</div>
									<div class="tdf2"><span class="c6">2017年4月12日 15:13:14</span></div>
									<div class="tdf1">
										<span class="c6">交易获得</span>
									</div>
								</div>
								<div class="integral-item">
									<div class="tdf3">
										<a class="integral-item__info" href="">
											<div class="img"><img src="images/temp/M-004.jpg" alt="" class="cover"></div>
											<div class="name ep2">锦瑟 原创传统日常汉服男绣花交领衣裳cp情侣装春夏款</div>
											<div class="type">颜色分类：深棕色 尺码：均码</div>
										</a>
									</div>
									<div class="tdf2">
										<b class="fz24 cg">+250</b>
									</div>
									<div class="tdf2"><span class="c6">2017年4月12日 15:13:14</span></div>
									<div class="tdf1">
										<span class="c6">交易获得</span>
									</div>
								</div>
								<div class="integral-item">
									<div class="tdf3">
										<a class="integral-item__info" href="">
											<div class="img"><img src="images/temp/M-005.jpg" alt="" class="cover"></div>
											<div class="name ep2">锦瑟 原创传统日常汉服男绣花交领衣裳cp情侣装春夏款</div>
											<div class="type">颜色分类：深棕色 尺码：均码</div>
										</a>
									</div>
									<div class="tdf2">
										<b class="fz24 cg">+450</b>
									</div>
									<div class="tdf2"><span class="c6">2017年4月12日 15:13:14</span></div>
									<div class="tdf1">
										<span class="c6">交易获得</span>
									</div>
								</div>
								<div class="integral-item">
									<div class="tdf3">
										<a class="integral-item__info" href="">
											<div class="img"><img src="images/temp/M-006.jpg" alt="" class="cover"></div>
											<div class="name ep2">锦瑟 原创传统日常汉服男绣花交领衣裳cp情侣装春夏款</div>
											<div class="type">颜色分类：深棕色 尺码：均码</div>
										</a>
									</div>
									<div class="tdf2">
										<b class="fz24 cr">-1000</b>
									</div>
									<div class="tdf2"><span class="c6">2017年4月12日 15:13:14</span></div>
									<div class="tdf1">
										<span class="c6">兑换消耗</span>
									</div>
								</div>
								<div class="integral-item">
									<div class="tdf3">
										<a class="integral-item__info" href="">
											<div class="img"><img src="images/temp/M-007.jpg" alt="" class="cover"></div>
											<div class="name ep2">锦瑟 原创传统日常汉服男绣花交领衣裳cp情侣装春夏款</div>
											<div class="type">颜色分类：深棕色 尺码：均码</div>
										</a>
									</div>
									<div class="tdf2">
										<b class="fz24 cr">-12450</b>
									</div>
									<div class="tdf2"><span class="c6">2017年4月12日 15:13:14</span></div>
									<div class="tdf1">
										<span class="c6">兑换消耗</span>
									</div>
								</div>
							</div>
							<div class="page text-right clearfix">
								<a class="disabled">上一页</a>
								<a class="select">1</a>
								<a href="">2</a>
								<a href="">3</a>
								<a class="" href="">下一页</a>
							</div>
						</div>
					</div>
				</div>
			</div>
		</section>
	</div>
	<!-- 右侧菜单 -->
	<div class="right-nav">
		<ul class="r-with-gotop">
			<li class="r-toolbar-item">
				<a href="udai_welcome.html" class="r-item-hd">
					<i class="iconfont icon-user" data-badge="0"></i>
					<div class="r-tip__box"><span class="r-tip-text">用户中心</span></div>
				</a>
			</li>
			<li class="r-toolbar-item">
				<a href="udai_shopcart.html" class="r-item-hd">
					<i class="iconfont icon-cart"></i>
					<div class="r-tip__box"><span class="r-tip-text">购物车</span></div>
				</a>
			</li>
			<li class="r-toolbar-item">
				<a href="udai_collection.html" class="r-item-hd">
					<i class="iconfont icon-aixin"></i>
					<div class="r-tip__box"><span class="r-tip-text">我的收藏</span></div>
				</a>
			</li>
			<li class="r-toolbar-item">
				<a href="" class="r-item-hd">
					<i class="iconfont icon-liaotian"></i>
					<div class="r-tip__box"><span class="r-tip-text">联系客服</span></div>
				</a>
			</li>
			<li class="r-toolbar-item">
				<a href="issues.html" class="r-item-hd">
					<i class="iconfont icon-liuyan"></i>
					<div class="r-tip__box"><span class="r-tip-text">留言反馈</span></div>
				</a>
			</li>
			<li class="r-toolbar-item to-top">
				<i class="iconfont icon-top"></i>
				<div class="r-tip__box"><span class="r-tip-text">返回顶部</span></div>
			</li>
		</ul>
		<script>
			$(document).ready(function(){ $('.to-top').toTop({position:false}) });
		</script>
	</div>
	
	
	<script>
									//顶端导入
		$("#dingdan").load("index_head.html");
		memu ();
	function memu ()
	{
	
		var list = "";
		$.ajax({
			xhrFields:{withCredentials: true},
		    type: "post",//请求方式
		    url: "http://localhost:16111/user/MenuSelect",//上s层的路径
			dataType: "json",
		    data:{},//传值
		    
		    success: function (data)
			{
				var user = eval('(' + JSON.stringify(data.data) + ')');
				
				
				list += '<div class=\"centers_listm_one\">'+
            	'<img src=\"images/zshy.png\"/>'+
                '<a href='+user.memu_url+'><em>'+user.memu_name+'</em></a>'+
            	'</div>';
            	for(var i in user.childMemu)
            	{
            		
            		list +='<div class=\"centers_listm_one_in\">'+
                '<img src=\"images/kouw.png\"/>'+
                '<em>'+user.childMemu[i].memu_name+'</em>'+
                '<b></b>'+
            	'</div>'+
            	'<span class="gjszmdm">';
            		for(var x in user.childMemu[i].childMemu)
            		{
            			
            			list += 
		                '<a href='+user.childMemu[i].childMemu[x].memu_url+' class=\"center_in_self\"><font>'+user.childMemu[i].childMemu[x].memu_name+'</font></a>';
		            	
            		}
            		list+='</span>';
            	} 
            	
            	$("#caidan").html(list);
		   }
		})		
		
	}
	</script>
	<script type="text/javascript">
			function getCookie(cookieName) {
    var strCookie = document.cookie;
    var arrCookie = strCookie.split("; ");
    for(var i = 0; i < arrCookie.length; i++){
        var arr = arrCookie[i].split("=");
        if(cookieName == arr[0]){
            return arr[1];
        }
    }
    return "";
}
var ding1=	setTimeout(cha3(),2000);
		function cha3(){
		$.ajax({
			xhrFields:{withCredentials: true},
				url: "http://localhost:16111/user/select_member_existing_integral",
				mimeType: "post",
				dataType: "json",
				data:{
					userid:getCookie("userid"),
				},
				success: function(date){
				
					var str="";
					
						
						str+="<b class='num'  style='    margin-left: 10px;'>"+date.data+"</b>";
		cha(date.data)
kedui(date.data);
				document.getElementById("jfen").innerHTML=str;

				},
			});
		}
		
		clearTimeout(ding1);
		
		function cha(t){
		$.ajax({
			xhrFields:{withCredentials: true},
				url: "http://localhost:16111/activity/chajfsp",
				mimeType: "post",
				dataType: "json",
				
					
				success: function(date){
				
					var str="";
					for (i in date) { 
						if(date[i].gral<t){
							str+=	"<div class='integral-item__list'>"+
										"<div class='integral-item' style='width:900px;'>"+
									"<div class='tdf3'>"+
											"<a class='integral-item__info' href=''>"+
												"<div class='img'><img src='" + date[i].commodity_picture+"'alt='' class='cover'></div>"+
											"<div class='name ep2'>"+date[i].commodity_name+"</div>"+
										"<div class='type'>颜色尺码:"+date[i].attribute+"</div>"+
						    "</a>"+
									"</div>"+
											"<div class='tdf2'><span class='c9'>"+date[i].price+"</span></div>"+
												"<div class='tdf2'><span class='cr'>"+date[i].gral+"</span></div>"+
									"<div class='tdf1'>"+
														"<a class='but' href='#' role='button' onclick=tiao(\""+date[i].commodity_name+"\",\""+date[i].commodity_picture+"\",\""+date[i].attribute+"\",\""+date[i].gral+"\",\""+date[i].tid+"\")>兑换</a>"+
													"</div>"+
										"</div>"+
								"</div>";
						}else if(date[i].gral>t){
							str+=	"<div class='integral-item__list'>"+
										"<div class='integral-item' style='width:900px;'>"+
									"<div class='tdf3'>"+
											"<a class='integral-item__info' href=''>"+
											"<div class='img'><img src='" + date[i].commodity_picture+"'alt='' class='cover'></div>"+
										"<div class='name ep2'>"+date[i].commodity_name+"</div>"+
									"<div class='type'>颜色尺码:"+date[i].attribute+"</div>"+
							"</a>"+
									"</div>"+
											"<div class='tdf2'><span class='c9'>"+date[i].price+"</span></div>"+
												"<div class='tdf2'><span class='cr'>"+date[i].gral+"</span></div>"+
									"<div class='tdf1'>"+
														"<a class='but disabled' href='#' role='button'>积分不够</a>"+
													"</div>"+
										"</div>"+
								"</div>";
						}
					}
				
				document.getElementById("neirong").innerHTML=str;

				},
			});
		
		}
		
		
		function kedui(t){
		$.ajax({
			xhrFields:{withCredentials: true},
				url: "http://localhost:16111/activity/chajfsp",
				mimeType: "post",
				dataType: "json",
				
					
				success: function(date){
				
					var str="";
					for (i in date) { 
						if(date[i].gral<t){
							str+=	"<div class='integral-item__list'>"+
										"<div class='integral-item' style='width:900px;'>"+
									"<div class='tdf3'>"+
											"<a class='integral-item__info' href=''>"+
												"<div class='img'><img src='" + date[i].commodity_picture+"'alt='' class='cover'></div>"+
										"<div class='name ep2'>"+date[i].commodity_name+"</div>"+
									"<div class='type'>颜色尺码:"+date[i].attribute+"</div>"+
						    "</a>"+
									"</div>"+
											"<div class='tdf2'><span class='c9'>"+date[i].price+"</span></div>"+
												"<div class='tdf2'><span class='cr'>"+date[i].gral+"</span></div>"+
									"<div class='tdf1'>"+
														"<a class='but' href='#' role='button' onclick=tiao(\""+date[i].commodity_name+"\",\""+date[i].commodity_picture+"\",\""+date[i].attribute+"\",\""+date[i].gral+"\",\""+date[i].tid+"\")>兑换</a>"+
													"</div>"+
										"</div>"+
								"</div>";
						}
						}
					
				
				document.getElementById("keduihuan").innerHTML=str;
		
				},
			});
		
		}
		

			function tiao(commodity_name,commodity_picture,attribute,gral,tid){
			
			
			window.location.href="point_exchange.html?quantity=1"+
			"&commodity_picture="+commodity_picture+
			"&commodity_nametop="+escape(commodity_name)+
			"&shoppricezhekou="+gral+
			"&leixin="+escape(attribute)+
			"&commodity_description="+escape("无 ")+
			"&id="+tid
				}
	
	</script>
</body>
</html>